<style>
.{{$t|escape:'html'}}_main {
  border-left: 15px solid #eaf2f5;
  border-right: 15px solid #eaf2f5;
  width: 1200px;
}
.{{$t|escape:'html'}}_subtitle {
  background-color: #e5f1f5;
  padding: 7px 0 7px 10px;
  font-family: Arial Black;
}
.{{$t|escape:'html'}}_emphasis {
  background-color: #d6e3e8;
  font-weight: bold;
  font-family: Trebuchet MS;
}
table.{{$t|escape:'html'}}_pagecreate {
}
table.{{$t|escape:'html'}}_pagecreate td.title {
  font-weight: bold;
  text-align: right;
  padding: 2px 10px 2px 20px;
  margin-right: 20px;
  background-color: #d6e3e8;
  font-family: Trebuchet MS;
  width: 150px;
  height: 30px;
}
table.{{$t|escape:'html'}}_pagecreate td.content {
  width: 400px;
}
.{{$t|escape:'html'}}_select {
  width: 195px;
  height: 23px;
  margin-left: 4px; 
}

.{{$t|escape:'html'}}_text {
  width: 275px;
  height: 20px;
  margin-left: 4px;
}
.{{$t|escape:'html'}}_textarea {
  width: 275px;
  height: 80px;
  margin-left: 4px;
}
.{{$t|escape:'html'}}_button {
  margin-top: 10px; 
  margin-left: 3px; 
}
</style>
<div class="{{$t|escape:'html'}}_main">
  <div>
    <div class="{{$t|escape:'html'}}_subtitle" style="text-align: center;background-color: #eaf2f5;">
      <span class="image_button" style="width: 100px;" onclick="save();">
        <table>
          <tr>
            <td><img src="image/btn/save24.png"></img></td>
            <td>{{t escape='html'}}Save{{/t}}</td>
          </tr>
        </table>
      </span>
    </div>
  </div>
  <div class="{{$t|escape:'html'}}_subtitle">{{t escape='html'}}Basic Information{{/t}}</div>
  <table class="{{$t|escape:'html'}}_pagecreate">
    <tr>
      <td class="title">{{t escape='html'}}Admin Account{{/t}}</td>
      <td class="content"><input onchange="_profile.account = this.value;" type="text" class="{{$t|escape:'html'}}_text" value="{{if !empty($profiles)}}{{$profiles[0]->account|escape:html}}{{/if}}"></input></td>
      <td class="title">{{t escape='html'}}Admin Email{{/t}}</td>
      <td class="content"><input onchange="_profile.email = this.value;" type="text" class="{{$t|escape:'html'}}_text" value="{{if !empty($profiles)}}{{$profiles[0]->email|escape:html}}{{/if}}"></input></td>
    </tr>
    <tr>
      <td class="title">{{t escape='html'}}Admin Password{{/t}}</td>
      <td class="content"><input onchange="_profile._newpass = this.value;" type="password" class="{{$t|escape:'html'}}_text" value="{{if !empty($profiles)}}{{$profiles[0]->password|escape:html}}{{/if}}"></input></td>
      <td></td>
      <td></td>
    </tr>
  </table>
  <div class="{{$t|escape:'html'}}_subtitle">{{t escape='html'}}SEO Details{{/t}}</div>
  <table class="{{$t|escape:'html'}}_pagecreate">
    <tr>
      <td class="title">{{t escape='html'}}Title{{/t}}</td>
      <td class="content"><input onchange="_profile.title = this.value;" type="text" class="{{$t|escape:'html'}}_text" value="{{if !empty($profiles)}}{{$profiles[0]->title|escape:html}}{{/if}}"></input></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td class="title">{{t escape='html'}}Description{{/t}}</td>
      <td class="content"><textarea onchange="_profile.desc = this.value;" class="{{$t|escape:'html'}}_textarea">{{if !empty($profiles)}}{{$profiles[0]->desc|escape:html}}{{/if}}</textarea></td>
      <td class="title">{{t escape='html'}}Key Words{{/t}}</td>
      <td class="content"><textarea onchange="_profile.keywords = this.value;" class="{{$t|escape:'html'}}_textarea">{{if !empty($profiles)}}{{$profiles[0]->keywords|escape:html}}{{/if}}</textarea></td>
    </tr>
  </table>
  <div class="{{$t|escape:'html'}}_subtitle">{{t escape='html'}}Mailing Server{{/t}}</div>
  <table class="{{$t|escape:'html'}}_pagecreate">
    <tr>
      <td class="title">{{t escape='html'}}Host{{/t}}</td>
      <td class="content"><input onchange="_profile.mail_host = this.value;" type="text" class="{{$t|escape:'html'}}_text" value="{{if !empty($profiles)}}{{$profiles[0]->mail_host|escape:html}}{{/if}}"></input></td>
      <td class="title">{{t escape='html'}}SMTP AUTH{{/t}}</td>
      <td class="content"><input onchange="_profile.mail_SMTPAuth = (this.checked) ? 1 : 0;" type="checkbox" {{if !empty($profiles) && $profiles[0]->mail_SMTPAuth == 1}}checked="1"{{/if}}></td>
    </tr>
    <tr>
      <td class="title">{{t escape='html'}}Account{{/t}}</td>
      <td class="content"><input onchange="_profile.mail_account = this.value;" type="text" class="{{$t|escape:'html'}}_text" value="{{if !empty($profiles)}}{{$profiles[0]->mail_account|escape:html}}{{/if}}"></input></td>
      <td class="title">{{t escape='html'}}Sender's Mail{{/t}}</td>
      <td class="content"><input onchange="_profile.mail_from_mail = this.value;" type="text" class="{{$t|escape:'html'}}_text" value="{{if !empty($profiles)}}{{$profiles[0]->mail_from_mail|escape:html}}{{/if}}"></input></td>
    </tr>
    <tr>
      <td class="title">{{t escape='html'}}Password{{/t}}</td>
      <td class="content"><input onchange="_profile.mail_password = this.value;" type="text" class="{{$t|escape:'html'}}_text" value="{{if !empty($profiles)}}{{$profiles[0]->mail_password|escape:html}}{{/if}}"></input></td>
      <td class="title">{{t escape='html'}}Sender's Name{{/t}}</td>
      <td class="content"><input onchange="_profile.mail_from_name = this.value;" type="text" class="{{$t|escape:'html'}}_text" value="{{if !empty($profiles)}}{{$profiles[0]->mail_from_name|escape:html}}{{/if}}"></input></td>
    </tr>
  </table>
  <div class="{{$t|escape:'html'}}_subtitle">{{t escape='html'}}Google App{{/t}}</div>
  <table class="{{$t|escape:'html'}}_pagecreate">
    <tr>
      <td class="title">{{t escape='html'}}Analytics Code{{/t}}</td>
      <td class="content"><input onchange="_profile.analytics_code = this.value;" type="text" class="{{$t|escape:'html'}}_text" value="{{if !empty($profiles)}}{{$profiles[0]->analytics_code|escape:html}}{{/if}}"></input></td>
      <td></td>
      <td></td>
    </tr>
  </table>
  <div>
    <div class="{{$t|escape:'html'}}_subtitle" style="text-align: center;background-color: #eaf2f5;">
      <span class="image_button" style="width: 100px;" onclick="save();">
        <table>
          <tr>
            <td><img src="image/btn/save24.png"></img></td>
            <td>{{t escape='html'}}Save{{/t}}</td>
          </tr>
        </table>
      </span>
    </div>
  </div>
</div>

{{*/* Javascript */*}}
<script src="jsrequest.php?script={{$t|escape:'html'}}" type="text/javascript"></script>
<script type="text/javascript">
  <!--
    var _profiles = JSON.parse('{{$profiles|@json_encode|escape:'javascript'}}');
    var _profile = (_profiles.length > 0) ? _profiles[0] : pz_profile.instance();
    
    function save() {
      new RequestUtils()._custom('profile', JSON.stringify(_profile), function(result, params) {
        location.reload();
      }, {
        pos : DOMUtils.findPos(this)
      });
    }
  // -->
</script>